import { useRoleStore } from "@/store/modules/useRoleStore";
import { createPinia } from 'pinia';
import { storeToRefs } from "pinia";


// 手动创建 Pinia 实例
const pinia = createPinia();

// 使用 store
const roleStore = useRoleStore(pinia);

const { role } = storeToRefs(roleStore);

export default {
  path: "/fenxi",
  redirect: "/fenxi/index",
  meta: {
    icon: "material-symbols:table-chart-view-sharp",
    title: "数据分析",
    // showLink: role.value == '0' ? false : true
    roles: ['0'],
  },
  children: [
    {
      path: "/fenxi/index",
      name: "Fenxi",
      component: () => import("@/views/fenxi/index.vue"),
      meta: {
        title: "数据分析"
      }
    }
  ]
  
} as RouteConfigsTable;
